Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect parsing #3214

Merged
merged 1 commit into from
Jul 25, 2020
Merged

Fix incorrect parsing #3214

merged 1 commit into from
Jul 25, 2020

Conversation

APickledWalrus
Copy link
Member

Description

I tracked down this issue down to this section of VariableString, where a plain text component is returned.
I'm pretty sure this is safe to do, so it shouldn't cause any issues. I figured grabbing the hex, updating the color, and removing it from the text would be the most efficient way to do this (instead of calling ChatMessages#parse).

While Utils#parseHexColor may return a null ChatColor, I don't think this code will ever run if the hex color is invalid, as text won't contain §x.


Target Minecraft Versions: 1.16+
Requirements: None
Related Issues: #3213

Copy link
Contributor

@ShaneBeee ShaneBeee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
If this has been tested well enough I think it should be good to go!

@APickledWalrus APickledWalrus merged commit 08f2d87 into SkriptLang:master Jul 25, 2020
@APickledWalrus APickledWalrus deleted the APickledWalrus-fixes-hex branch September 24, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants